1
general::
Declare one's certainty that something will not happen or is untrue. This hyperbolic expression almost always follows an if-clause, as in If he's on time, I'll eat my hat, that is, "I'll consume my headgear if I'm wrong." Charles Dickens used it in Pickwick Papers (1837): "If I knew as little of life as that, I'd eat my hat and swallow the buckle whole." [First half of 1800s]
American Heritage Idioms